<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>{$title}-{$Think.lang.web_name}</title>
    <meta name="keywords" content="网站制作,博客,个人博客,个人网站,网站建设,网站模板">
    <meta name="description" content="">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    {include file="comm/header"/}
</head>
<body>
{include file="comm/nav_top"/}

<div class="swiper-container" data-desc="轮播图">
    <div class="swiper-wrapper" id="banner1">
        {if $banner && is_array($banner)}
        {foreach name="banner" key="key" id="v" index="i"}
        <div class="swiper-slide">
            <div style="overflow: hidden;" data-attr="banner">
                <img style="max-width: 100%" src="{$v}">
            </div>
        </div>
        {/foreach}
        {/if}
    </div>
    <div class="swiper-pagination"></div>
</div>

{if isset($container_1) && is_array($container_1)}
<div class="s-module col-sm-12" data-desc="文章模型12篇" style="margin: 5em 0 0 0;">
    <nav class="s-module-nav"><h3><i class="fa fa-circle"></i> {$container_1.name}</h3></nav>
    <div class="s-module-container">
        {if is_array($container_1.data)}
        {foreach name="$container_1.data" key="key" id="v" index="i" offset="0" length="12"}
        <div class="col-sm-3" style="" data-attr="1">
            <div class="s-module-img_box">
                <img src="{$v.meida_img}" style="max-width: 100%;max-height: 100%;">
            </div>
            <div class="s-module-article_box">
                <h4>{$v.media_title}</h4>
                <p>{$v.media_desc}</p>
                <div><a href="/Index/article/id/{$v.media_id}/cate_id/{$v.media_category_id}"><i class="fa fa-plus"></i> 文章阅读</a></div>
            </div>
        </div>
        {/foreach}
        {/if}
        <!--<div class="col-sm-3" style="" data-attr="1">
            <div class="s-module-img_box">
                <img src="/kindeditor/attached/image/20190416/20190416224359_39935.jpg" style="max-width: 100%;max-height: 100%;">
            </div>
            <div class="s-module-article_box">
                <h4>标题标题标题标题标题标题标题  </h4>
                <p>文章简述文章简述文章简述文章简述-webkit-line-clamp文章简述文章简述文章简述文章简述文章简述文章简述文章简述文章简述文章简述文章简述文章简述文章简述文章简述文章简述文章简述文章简述</p>
                <div><a href=""><i class="fa fa-plus"></i> 文章阅读</a></div>
            </div>
        </div>-->
    </div>
</div>
{/if}

{if isset($container_2) && is_array($container_2)}
<div class="s-module col-sm-12" data-desc="单页">
    <nav class="nav nav-divider s-module-nav"><h3><i class="fa fa-circle"></i> {$container_2.name}</h3></nav>

</div>
{/if}

{if isset($container_3) && is_array($container_3)}
<div class="s-module col-sm-12" data-desc="图集">
    <nav class="nav nav-divider s-module-nav"><h3><i class="fa fa-circle"></i> {$container_3.name}</h3></nav>

</div>
{/if}

{include file="comm/footer"/}

<script type="text/javascript">
    var mySwiper = new Swiper('.swiper-container',{
        speed: 500,
        parallax:true,
        loop:true,
        // scrollbar: {
        //     el: '.swiper-scrollbar',
        // },
        pagination :{
            el: '.swiper-pagination',
            clickable :true,
        },
        autoplay:{

        },
    });
    mySwiper.el.onmouseover=function (e) {
        mySwiper.autoplay.stop();
    }
    mySwiper.el.onmouseout=function (e) {
        mySwiper.autoplay.start();
    }
    $(function () {
        try {
            var data_attr_1 = $("[data-attr=1]");
            var data_attr_banner = $("[data-attr=banner]");
            data_attr_banner.css({height: (data_attr_banner[0].offsetWidth/2)+"px"});
            data_attr_1.css({height: (data_attr_1[0].offsetWidth*5/4)+"px"});
        }catch (e) {}
        try {
            var s_module = $(".s-module-img_box");
            s_module.css({lineHeight:(s_module[0].offsetHeight-3)+"px"});
        }catch (e) {}
        Events.add(window,"resize",function (e) {
            try {
                data_attr_1.css({height: (data_attr_1[0].offsetWidth*5/4)+"px"});
                data_attr_banner.css({height: (data_attr_banner[0].offsetWidth/2)+"px"});
            }catch(e){}
            try {
                var s_module = $(".s-module-img_box");
                s_module.css({lineHeight:(s_module[0].offsetHeight-3)+"px"});
            }catch (e) {}
        },true);
    });

</script>
</body>
</html>